#项目名称
#PROJECT(HELLOWORLD)
 
#定义变量
#SET(SRC_LIST helloworld.cpp)
 
#打印用户的一些信息
#MESSAGE(STATUS "This is BINARY dir " ${HELLOWORLD_BINARY_DIR})
#MESSAGE(STATUS "This is SOURCE dir "${HELLOWORLD_SOURCE_DIR})
 
#生成可执行文件s
#ADD_EXECUTABLE(helloworld ${SRC_LIST})

cmake_minimum_required(VERSION 3.10)
project(cppproject)

include(FetchContent)

# Also requires one of: libbfd (gnu binutils), libdwarf, libdw (elfutils)
FetchContent_Declare(backward
        GIT_REPOSITORY git@gitee.com:cplus-learn/backward-cpp.git
        GIT_TAG v1.6)

FetchContent_MakeAvailable(backward)

# file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS src/*.cpp)
# add_executable(example ${SOURCES} ${BACKWARD_ENABLE}) # Notice the "BACKWARD_ENABLE" here
# add_backward(example)

add_executable(test main.cpp ${BACKWARD_ENABLE})
add_backward(test)
target_link_libraries(test dw)
